package com.lyx.service;

import com.lyx.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Service
@FeignClient("spring-cloud-alibaba-provider")
public interface OpenFeignService {
    @GetMapping("/hello/nacos/{id}")
    public String testOpenFeign1(@PathVariable("id") Integer id);

    @PostMapping("/hello/user")
    public String testOpenFeign2(@RequestBody User user);
}
